<template>
  <div>
    <el-table
      :data="tableData"
      style="width: 100%">
      <el-table-column
        prop="id"
        label="ID"
        width="180">
      </el-table-column>
      <el-table-column
        prop="name"
        label="职责"
        width="180">
      </el-table-column>

    </el-table>

  </div>
</template>

<script>
import Axios from 'axios'
export default {
    data(){
        return{
            tableData:'',
        }
    },
    mounted(){
        Axios.get('http://127.0.0.1:8000/duty/').then(resp=>{
            console.log(resp)
            this.tableData = resp.data
        }).catch(err=>{
            console.log(err)
        })
    }

}
</script>

<style>

</style>